#include<stdio.h>
#include<malloc.h>
typedef int ElemType;
typedef struct LNode
{
    ElemType data;
    struct LNode *next;
}LinkNode;
void del_x(LinkNode *&L,ElemType x)
{
    LinkNode *p=L->next,*q,*pre=L;
    while(p!=NULL)
    {
        if(p->data=x)
        {
            q=p;
            p=p->next;
            pre->next=p;
            free(q);
        }
        else
            pre=p;
            p=p->next;
    }
}
int main()
{
    LinkNode *h;
    ElemType e;
    printf("移除链表元素\n");
    del_x(h,e);
}